<template>
  <div class="fml-relative">
    <div class="fml-layout">
      <div class="fml-body animated fadeInDown">
        <!-- 查询条件 -->
        <div class="fml-ui-forms">
          <fml-search :formConfig="formConfig" ref="searchComp"></fml-search>
        </div>
        <!-- 列表操作按钮 -->
        <div class="ui-datagrid-header">
           <fml-handle-btn
              class="fml-other-btn mr0"
              :btnConfig="btnConfig"
              @getHandleState="stateHandle"
            ></fml-handle-btn>
        </div>
        <!-- 列表 -->
        <div class="fml-table-box">
          <fml-grid :PageConfig="pageConfig">
            <el-table-column slot="operation" label="操作" fixed="right" align="center" :width="150">
              <template slot-scope="scope">
                <fml-edit-btn
                  type="edit"
                  size="mini"
                  styleType="plain"
                  text="修改"
                  btnUrl="ROLE_MENU_UPDATE"
                  :disabled="scope.row.id==1?true:false"
                  :scope="scope"
                ></fml-edit-btn>
              </template>
            </el-table-column>
          </fml-grid>
        </div>
      </div>
    </div>
    <!-- 弹窗 -->
    <add-edit-dialog></add-edit-dialog>

  </div>
</template>
<script>
import { defaultConfig,btnData, tableConfig } from "./config";
import addEditDialog from "./add-edit-dialog";
import { fmlRequest } from "@/utils";
export default {
  name: "fmlLogManagement",
  components: {
    addEditDialog
  },
  data() {
    return {
      //表单配置
      formConfig: {
        defaultConfig,
        fmlForm: {}
      },
      //按钮
      btnConfig:{
        btnData:btnData
      },
      // 列表
      pageConfig: {
        selection:false,//是否复选
        formHeight:270,
        showNum:true,//显示序列号=
        tableConfig, //列表信息
        Api: 'roleList', //列表接口
        DataHandler(data){
          return data
        }
      }
    };
  },
  methods: {
     // 操作按钮当前按钮
    stateHandle(state) {
      this.state = state;
    }
  },
  mounted() {
    this.$store.commit("setUpdateTable");
  }
};
</script>
<style scoped>
  .fml-tree-dialog .el-tree{
    width:250px;
    height:343px;
    background:rgba(255,255,255,1);
    border:1px solid rgba(205, 205, 205, 1);
    padding:12px
  }
</style>
